package com.mida.dms.knw.mapper;

import com.mida.dms.knw.entity.KnwCodingConceptualDomain;
import com.mida.dms.knw.entity.vo.KnwCodingConceptualDomainPageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 概念域——编码体系关系dao
 *
 * @author conyfrommars
 */
public interface KnwCodingConceptualDomainMapper extends BaseMapper<KnwCodingConceptualDomain> {

    List<KnwCodingConceptualDomain> selectByDomainSoid(Long domainSoid) throws Exception;

    void updateIsPreferredOn(Long soid) throws Exception;

    void updateIsPreferredOff(Long soid) throws Exception;

    void insertSelective(KnwCodingConceptualDomain knwCodingConceptualDomain) throws Exception;

    void deleteByDomainSoid(long domainSoid);

    int countByDomainSoidAndDerailCodingSystemSoid(@Param("domainSoid") long domainSoid, @Param("derailCodingSystemSoid") Long derailCodingSystemSoid);

    List<KnwCodingConceptualDomainPageVo> getCodingDomainAll(@Param("domainSoid") Long domainSoid);

    Integer countIsPreByDomainSoid(@Param("domainSoid") Long domainSoid);

    int getCntByDcsSoid(Long dataSourceSoid) throws Exception;
}